/**
 * World.cpp
 *
 * Author:
 *   Chris Herbison
 *
 * Description:
 *   Class which keep track of all objects in world space.
 */

#include "World.h"

/*
 * The constructor.
 */
World::World(){
}

/*
 * Adds an object to the world's list of objects.
 * 
 * o - The object to be added.
 */
void World::add(Object* o){
     worldObjects.push_back(o);
}

/*
 * Adds an light to the world's list of light.
 * 
 * l - The light to be added.
 */
void World::add(Light l){
     worldLights.push_back(l);
}

void World::setTree(KDTree t){
	worldTree = t;
}

/*
 * Creates a ray.
 *
 * r - The ray to spawn.
 */
void World::spawnRay(Ray r){
     worldRays.push_back(r);
}
